package net.starwifi.duobao.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import net.starwifi.duobao.mvc.Filter;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import javax.persistence.*;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.HashSet;
import java.util.Set;


/**
 * Entity - 商家
 *
 * @version 1.0
 */
@Entity
@Table(name = "duob_store")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "duob_store_sequence")
public class Store extends BaseEntity {

	private static final long serialVersionUID = -7849848867030199578L;

	private  String code; //商户标识

	private String name; //商户名称
	private  String logo; //商家Logo
	private  String bak; //备注
	private String detail; //详情
	private String photo; //联系方式
	private String province_id; //地址id
	private  String address;  //详细地址
    private Operator operator; //关联账号
	private String yyImgPath; //运营图片
	private String institutionCode; //组织机构代码
	private String cpId;  //标识id

	@Column
	@JsonProperty
	public String getInstitutionCode() {
		return institutionCode;
	}

	public void setInstitutionCode(String institutionCode) {
		this.institutionCode = institutionCode;
	}
	@Column
	@JsonProperty
	public String getYyImgPath() {
		return yyImgPath;
	}

	public void setYyImgPath(String yyImgPath) {
		this.yyImgPath = yyImgPath;
	}
	@ManyToOne
	@JoinColumn(name = "operator_id",updatable = false)
	public Operator getOperator() {
		return operator;
	}

	public void setOperator(Operator operator) {
		this.operator = operator;
	}
	@Column
	@JsonProperty
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	@Column
	@JsonProperty
	public String getProvince_id() {
		return province_id;
	}

	public void setProvince_id(String province_id) {
		this.province_id = province_id;
	}
	@Column
	@JsonProperty
	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}
	@Column
	@JsonProperty
	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}
	@Column
	@JsonProperty
	public String getBak() {
		return bak;
	}

	public void setBak(String bak) {
		this.bak = bak;
	}
	@Column
	@JsonProperty
	public String getLogo() {
		return logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}
	@Column
	@JsonProperty
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	@Column
	@JsonProperty
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getCpId() {
		return cpId;
	}

	public void setCpId(String cpId) {
		this.cpId = cpId;
	}
}